<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <title>评价</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="evaluate">
    <textarea id="pjcontent" name="" class="msg" placeholder="说两句吧···"></textarea>

    <!--<div class="upload-pictures">-->
        <!--<div class="z_photo upimg-div clearfix">-->
            <!--<section class="z_file fl">-->
                <!--<img src="img/a11.png" class="add-img">-->
                <!--<input type="file" name="file" id="file" class="file" value=""-->
                       <!--accept="image/jpg,image/jpeg,image/png,image/bmp" multiple/>-->
            <!--</section>-->
        <!--</div>-->
    <!--</div>-->
    <!-- 插件地址 http://www.jq22.com/jquery-info13194 -->
    <!--<aside class="mask works-mask">-->
        <!--<div class="mask-content">-->
            <!--<p class="del-p">您确定要删除作品图片吗？</p>-->
            <!--<p class="check-p"><span class="del-com wsdel-ok">确定</span><span class="wsdel-no">取消</span></p>-->
        <!--</div>-->
    <!--</aside>-->
    <div class="score bottom-border">
        <h3 class="title">服务评分</h3>
        <ul onclick="fwpj()" class="star-wrapper fuwu-hook">
            <li class="on"></li>
            <li class="on"></li>
            <li class="on"></li>
            <li class="on"></li>
            <li class="on"></li>
        </ul>
    </div>
    <div class="score">
        <h3 class="title">配送评分</h3>
        <ul onclick="wlpj()" class="star-wrapper peisong-hook">
            <li class="on"></li>
            <li class="on"></li>
            <li class="on"></li>
            <li class="on"></li>
            <li class="on"></li>
        </ul>
    </div>
</div>

<div class="evaluate-submit-section">
    <div class="evaluate-submit-wrapper">
        <a onclick="tijiaopinjia()" href="#" class="evaluate-submit">提交</a>
    </div>
    <div class="zhanwei"></div>
</div>


<!-- 以下为页面js部分 -->
<script type="text/javascript" src="js/rem.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/imgUp.js"></script>
<script src="js/pages/public.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    var urlParam = getUrlParam("orderId");
    star('.fuwu-hook');
    star('.peisong-hook');
    var fwpjcount=5;
    var wlpjcount=5;
   // pjcontent
    function tijiaopinjia() {
        var val = $("#pjcontent").val();
        $.ajax({
            type: "post",
            url: ajaxUrl + "/mobile/product/comment/doComment",
            async: false,
            data: {'orderId': urlParam, 'memberId': memberId, 'expressScores': wlpjcount,'serviceScores':fwpjcount,"productIds":250},
            success: function (data) {
          //      window.location.href="/index.html"
            }
        });

        window.location.href="/index.html"
    }
    function fwpj() {
        var length = $(".fuwu-hook .on").length;
        fwpjcount=length;
        console.log(length);
    }
    function wlpj() {
        var length = $(".peisong-hook .on").length;
        wlpjcount=length;
        console.log(length);
    }
    function star(class_on) {
      //  if (.function )
        var aLi = document.querySelector(class_on).children;
      //  console.log(aLi.length)
        for (var i = 0; i < aLi.length; i++) {
            aLi[i].index = i;
            aLi[i].onclick = function () {
                for (var i = 0; i < aLi.length; i++) {
                    if (this.index >= i) {
                        aLi[i].className = 'on';
                    } else {
                        aLi[i].className = '';
                    }
                }
            };
        }
    }

    // 星星评分
</script>
</body>
</html>